package com.example.cd5160866.modelrecycleview.activity;

import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.GridLayoutManager;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.support.v7.widget.Toolbar;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.widget.AdapterView;
import android.widget.ListView;

import com.example.cd5160866.modelrecycleview.R;

import java.util.ArrayList;
import java.util.List;

import butterknife.BindView;
import butterknife.ButterKnife;

/**
 * Created by cd5160866 on 16/9/30.
 */
public class DemoBaseActivity extends AppCompatActivity {

    protected List<String> data;

    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.demo_base);
        ButterKnife.bind(this);
        initDada();
        //        recyclerView = (RecyclerView) findViewById(R.id.rv_demo_base);
        Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
        setSupportActionBar(toolbar);
    }


    private void initDada() {
        data = new ArrayList<>();
//        data.add("http://upload4.hlgnet.com/bbsupfile/2010/2010-12-26/20101226151451_39.jpg");
        data.add("http://img1.imgtn.bdimg.com/it/u=2816269382,3258126399&fm=23&gp=0.jpg");
        data.add("http://img.taopic.com/uploads/allimg/140318/240405-14031PH95829.jpg");
        data.add("http://img3.100bt.com/upload/ttq/20130413/1365830891087.jpg");
        data.add("http://img2.duitang.com/uploads/item/201201/16/20120116004745_THihZ.jpg");
        data.add("http://a1.att.hudong.com/28/57/20300534506289144593571229462_s.jpg");
        data.add("http://g.hiphotos.baidu.com/image/h%3D200/sign=ccb17e18d03f8794ccff4f2ee21a0ead/a8773912b31bb051a6ed2e88327adab44bede041.jpg");
    }

    @Override
    public boolean onCreateOptionsMenu(Menu menu) {
        getMenuInflater().inflate(R.menu.menu_main, menu);
        return super.onCreateOptionsMenu(menu);
    }
}
